package org.example.oauth2.constant;

/**
 * @program: rabbitmq-study
 * @description:
 * @Version V1.6.0
 * @author: dazhi
 * @create: 2022-03-07 11:56
 **/
public interface AuthConstant {
    /**
     * 密码加密规则
     */
    String ENCRYPT = "{a}";
    /**
     * sys_client表字段
     */
    String CLIENT_FIELDS = "client_id, CONCAT('{noop}',client_secret) as client_secret, resource_ids, scope, authorized_grant_types, " +
            "web_server_redirect_uri, authorities, access_token_validity, " +
            "refresh_token_validity, additional_information, autoapprove";

    /**
     * sys_client查询语句
     */
    String BASE_STATEMENT = "select " + CLIENT_FIELDS + " from sys_client";

    /**
     * sys_client查询排序
     */
    String DEFAULT_FIND_STATEMENT = BASE_STATEMENT + " order by client_id";

    /**
     * 查询client_id
     */
    String DEFAULT_SELECT_STATEMENT = BASE_STATEMENT + " where client_id = ?";
}
